<template>
  <div class="my-input">
    <label>{{ label }}</label
    >:
    <input
      :value="modelValue"
      :placeholder="placeholder"
      type="text"
      @input="changeINPUT"
    />
    <span>{{ iocn }}</span>
  </div>
</template>

<script>
export default {
  props: {
    placeholder: String,
    label: String,
    modelValue: String,
    iocn: String,
  },
  setup(props, { emit }) {
    function changeINPUT() {
      emit("update:modelValue", event.target.value);
    }
    return {
      changeINPUT,
    };
  },
};
</script>

<style lang="scss" scoped>
.my-input {
  width: 80%;
  display: flex;
  justify-content: space-between;
  height: 40px;
  align-items: center;
  margin: 10px 0;
}
input {
  height: 40px;
  border-radius: 7px;
  outline: none;
  margin: 10px 0;
  border: 1px solid #cccc;
  margin-right: 8px;
}
label {
  width: 70px;
  text-align: justify;
  overflow: hidden;
  text-align-last: justify;
}
</style>
